//
// Created by 顾蛟 on 2020/7/2.
//

#ifndef DEMOTRIANGLE_MYGLRENDERCONTEXT_H
#define DEMOTRIANGLE_MYGLRENDERCONTEXT_H

#include <GLES3/gl3.h>
#include <EGL/egl.h>
#include "LogUtil.h"
#include "Triangle.h"

class MyGLRenderContext {
    MyGLRenderContext();
    ~MyGLRenderContext();
private:
    static MyGLRenderContext *renderContext;
    int mScreenWidth;
    int mScreenHeight;
    Triangle triangle;
public:
    void onSurfaceCreated();
    void onSurfaceChanged(int width, int height);
    void onDrawFrame();
    static MyGLRenderContext* getInstance();
    static void destroyInstance();
};

#endif //DEMOTRIANGLE_MYGLRENDERCONTEXT_H
